package com.cakemallproject.mapper;

import com.cakemallproject.pojo.mapperObj.Goods;
import com.cakemallproject.pojo.mapperObj.Recommend;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface RecommendMapper {
    @Select("select * from recommend where status = 1")
    List<Recommend> list();

    @Insert("insert recommend(gid) value(#{gid})")
    void insert(Integer gid);

    void delete(List<Integer> ids);

    @Select("select * from recommend where status = 1 and gid = #{gid}")
    Recommend getByGid(Integer gid);
}
